package com.xxy.service;

import com.xxy.entity.User;
import com.xxy.mapper.UserMapper;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service
public class UserService {

    @Resource
    private UserMapper userMapper;

    /**
     * 通过id查找user
     * @param id
     * @return
     */
    public User findById(Integer id){
        User user = userMapper.selectById(id);
        return user;
    }
}
